package net.csdn.business.kanban.api.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @ClassName KanbanStatus
 * @Description TODO
 * @Author liuzhisheng
 * @Date 2023/9/14
 **/
@Getter
@AllArgsConstructor
public enum FieldStatusDefaultEnums {
    TODO("Todo","任务未开始",FieldStatusColorEnums.GREEN,1),
    PROGRESS("In Progress","任务处理中",FieldStatusColorEnums.YELLOW,2),
    DONE("Done","任务已完成",FieldStatusColorEnums.PURPLE,3);
    final String name;
    final String desc;
    final FieldStatusColorEnums color;
    final Integer sort;

    public static FieldStatusDefaultEnums ofCode(String name) {
        for (FieldStatusDefaultEnums type : FieldStatusDefaultEnums.values()) {
            if (type.name.equals(name)) {
                return type;
            }
        }
        throw new IllegalArgumentException("FieldStatusDefaultEnums param error");
    }
}
